package com.itheima.health.mq;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import java.util.Map;

@Component
public class SmsConsumer {

    @RabbitListener(queues = "heima-queue")
    public void receive(Map map) {

        String telephone = (String) map.get("telephone");
        String code = (String) map.get("code");

        System.out.println(map);
    }
}
